<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_user_order".
 *
 * @property string $id
 * @property integer $userid
 * @property string $username
 * @property double $amount
 * @property integer $status
 * @property integer $type
 * @property integer $isupgrade
 * @property integer $created_at
 * @property integer $updated_at
 */
class UserOrder extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_user_order';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'userid', 'username', 'amount', 'status'], 'required'],
            [['userid', 'status', 'type', 'isupgrade', 'created_at', 'updated_at'], 'integer'],
            [['amount'], 'number'],
            [['id'], 'string', 'max' => 50],
            [['username'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '订单编号',
            'userid' => '用户编号',
            'username' => '用户账号',
            'amount' => '金额',
            'status' => '交易状态',
            'type' => '订单类型',
            'isupgrade' => '升级订单',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
